const { deflate, unzip, deflateSync } = require('zlib');

const input = '.................................';
deflate(input, (err, deflateBuffer) => {
  if (err) {
    console.error('An error occurred:', err);
    process.exitCode = 1;
  }
  console.log('deflate：', deflateBuffer.toString('base64'));

  unzip(deflateBuffer, (err, unzipBuffer) => {
    if (err) {
      console.error('An error occurred:', err);
      process.exitCode = 1;
    }
    console.log("unzip：", unzipBuffer.toString());
  });
});
